A process for determining whether a block of pixels to be compressed is either of two types of image data, or contains a boundary between the types, so that the lossy compressor used to compress the block will be optimized for the first or second type of data, or for a transition between the two.
When data must be transmitted or stored it is usually compressed first, to reduce the transmission time or storage requirement. This is especially true of image data which can consist of four color separations of 8-bit pixels.
One method of compression is xe2x80x9chierarchical vector quantizationxe2x80x9d (HVQ), where a block of data can be reduced to a single codeword in a number of steps. This method is described in U.S. Pat. No. 5,602,589, and is incorporated by reference herein. This procedure can be explained most clearly by the use of a numerical example in connection with FIG. 1a of that patent. Assume that a 2 by 4 pixel block, 8 bits per pixel, is to be compressed to one 9-bit number. First, each pair of pixels is applied to a stage 1 look up table (LUT) containing 9-bit code words, each code word being associated with a two-pixel bit pattern. The table is set up so that if an exact match of the input pixel bits is not available, then a codeword associated with the closest match is output instead. The ultimate output of this stage 1 is four codewords, each describing the closest match to the bit pattern of the two input pixels. Since the exact match frequently is not possible, this compression is inherently lossy to some extent. The output of the first stage is four 9-bit codewords.
Assuming this amount of compression is not sufficient, these four codewords, each representing the bit pattern of a 1 by 2 pixel block are next applied to two stage 2 tables, resulting in a total of two 9-bit output codewords, each representing the bit pattern of a 2 by 2 pixel block. If the compression is still insufficient, these two are applied to the stage 3 table to yield the final output word, which is associated with a 2 by 4 pixel block. It can now be seen that this method is hierarchical in that a plurality of stages are used, it involves vectors since the input pixels have a directional relationship with each other, and is quantized in that a number of levels can be implemented to achieve any degree of compression.
For decompression, each codeword is simply applied to a 256 K by 64 bit LUT which outputs the bit pattern of the entire 8-pixel block.
In a printing system which uses HVQ, the data is supplied to the lossy compressor in blocks of pixels, each block being text, contone, halftone, etc. So that the compressor may configure itself optimally for the kind of data being received, the front end may supply to the compressor a mask which determines the boundaries between different kinds of data, and printing hints which specify which configuration should be used for the data that falls within each mask. In this system the mask edges must be aligned with the block edges.
The system can be improved by a system for determining if there is a boundary within a block, which can be referred to as a transition block. For example, if a boundary between a text character and a contone picture runs through a block, then a printing hint will be sent to the compressor, and table values optimized for transition blocks can be selected for that block. This would improve system performance by allowing the compressor to operate with less loss.